import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
    {
    title: '退房类型',
    align:"center",
    dataIndex: 'type_dictText'
   },
   {
    title: '申请退房时间',
    align:"center",
    dataIndex: 'applyTime'
   },
   {
    title: '办理退房时间',
    align:"center",
    dataIndex: 'withdrawTime'
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'note'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '退房类型',
    field: 'type',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"withdraw_type"
     }
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入退房类型!'},
          ];
     },
  },
  {
    label: '申请退房时间',
    field: 'applyTime',
    component: 'Input',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入申请退房时间!'},
          ];
     },
  },
  {
    label: '办理退房时间',
    field: 'withdrawTime',
    component: 'Input',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入办理退房时间!'},
          ];
     },
  },
  {
    label: '备注',
    field: 'note',
    component: 'InputTextArea',//TODO 注意string转换问题
  },
];
